﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Member_changePasswoaspx : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
 
        }

    }
    //更改密码
    protected void ChangePassword1_ChangedPassword(object sender, EventArgs e)
    {
        string EncrTicket = Request.Cookies[FormsAuthentication.FormsCookieName].Value;
        FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(EncrTicket);
        string UserName = ticket.Name;
        Members member = new Members();
        foreach (var mem in member.GetMembersByName(UserName))
        {
            Session["password"]=ChangePassword1.NewPassword;
        }
    }
}